package com.tangji.signaltower.enums;

/**
 * Created with IntelliJ IDEA.
 * User: Amarendar
 * Date: 2020/6/15
 * Time: 下午5:51
 */
public enum BizCodeEnum {

    C0001("C0001", "客户端token上报+行情订阅"),
    C9999("C9999", "客户端心跳"),

    S0001("S0001", "服务端行情数据"),
    S0002("S0002", "服务端弹窗推送"),
    S0003("S0003", "引导正式交易提醒"),
    S0004("S0004", "赔率变动通知"),
    S0005("S0005", "首充赠送金通知"),
    S9999("S9999", "服务端心跳响应"),

    ;

    private String bizCode;
    private String desc;

    BizCodeEnum(String bizCode, String desc) {
        this.bizCode = bizCode;
        this.desc = desc;
    }

    public String getBizCode() {
        return bizCode;
    }

    public void setBizCode(String bizCode) {
        this.bizCode = bizCode;
    }

    public String getDesc() {
        return desc;
    }

    public BizCodeEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public static BizCodeEnum getEnum(String bizCode) {
        BizCodeEnum statusEnums = null;
        for (BizCodeEnum e : BizCodeEnum.values()) {
            if (e.getBizCode().equals(bizCode)) {
                statusEnums = e;
                break;
            }
        }
        return statusEnums;
    }
}
